import axios from '@/libs/api.request'

export const getIndexRolls = () => {
  return axios.request({
    url:   'indexroll',
    method: 'get'
  })
}

export const getIndexRollById = (id) => {
  return axios.request({
    url:   'indexroll/'+id,
    method: 'get'
  })
}

export const addIndexRoll = (roll) => {
  return axios.request({
    url:   'indexroll',
    data: roll,
    method: 'post'
  })
}

export const updateIndexRoll = (roll) => {
  return axios.request({
    url:   'indexroll',
    data: roll,
    method: 'put'
  })
}

export const deleteIndexRoll = (id) => {
  return axios.request({
    url:   'indexroll',
	params: {"id":id},
    method: 'delete'
  })
}